package sortAlgorithm;

import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Arrays;

public class Setup {

	public static ZoneId DEFAULT_ZONE = ZoneId.systemDefault();

	public static void main(String[] args) {
		int[] source;
		int[] source2;

		// LocalDateTime.now().atZone(DEFAULT_ZONE).toInstant().toEpochMilli();

		// BubbleSort
		source = new int[] { 1, 6, 3, 8, 33, 27, 66, 9, 7, 88 };
		source2 = new int[] { 3, 44, 38, 5, 47, 15, 36, 26, 27, 2, 46, 4, 19, 50, 48 };
		System.out.println("---------BubbleSort---------");
		System.out.println(LocalDateTime.now());
		System.out.println(Arrays.toString(BubbleSort.sort(source2)));
		System.out.println(LocalDateTime.now());

		// SelectionSort
		source = new int[] { 1, 6, 3, 8, 33, 27, 66, 9, 7, 88 };
		source2 = new int[] { 3, 44, 38, 5, 47, 15, 36, 26, 27, 2, 46, 4, 19, 50, 48 };
		System.out.println("---------SelectionSort---------");
		System.out.println(LocalDateTime.now());
		System.out.println(Arrays.toString(SelectionSort.sort(source2)));
		System.out.println(LocalDateTime.now());

		// InsertionSort
		source = new int[] { 1, 6, 3, 8, 33, 27, 66, 9, 7, 88 };
		source2 = new int[] { 3, 44, 38, 5, 47, 15, 36, 26, 27, 2, 46, 4, 19, 50, 48 };
		System.out.println("---------InsertionSort---------");
		System.out.println(LocalDateTime.now());
		System.out.println(Arrays.toString(InsertionSort.sort(source2)));
		System.out.println(LocalDateTime.now());

		// QuickSort
		source = new int[] { 1, 6, 3, 8, 33, 27, 66, 9, 7, 88 };
		source2 = new int[] { 3, 44, 38, 5, 47, 15, 36, 26, 27, 2, 46, 4, 19, 50, 48 };
		System.out.println("---------QuickSort---------");
		System.out.println(LocalDateTime.now());
		System.out.println(Arrays.toString(QuickSort.sort(source2)));
		System.out.println(LocalDateTime.now());
		
		// MergeSort
		source = new int[] { 1, 6, 3, 8, 33, 27, 66, 9, 7, 88 };
		source2 = new int[] { 3, 44, 38, 5, 47, 15, 36, 26, 27, 2, 46, 4, 19, 50, 48 };
		System.out.println("---------MergeSort---------");
		System.out.println(LocalDateTime.now());
		System.out.println(Arrays.toString(MergeSort.sort(source2)));
		System.out.println(LocalDateTime.now());
		
		// ShellSort
		source = new int[] { 1, 6, 3, 8, 33, 27, 66, 9, 7, 88 };
		source2 = new int[] { 3, 44, 38, 5, 47, 15, 36, 26, 27, 2, 46, 4, 19, 50, 48 };
		System.out.println("---------ShellSort---------");
		System.out.println(LocalDateTime.now());
		System.out.println(Arrays.toString(ShellSort.sort(source2)));
		System.out.println(LocalDateTime.now());
		
		
		// HeapSort
		source = new int[] { 1, 6, 3, 8, 33, 27, 66, 9, 7, 88 };
		source2 = new int[] { 3, 44, 38, 5, 47, 15, 36, 26, 27, 2, 46, 4, 19, 50, 48 };
		System.out.println("---------HeapSort---------");
		System.out.println(LocalDateTime.now());
		System.out.println(Arrays.toString(HeapSort.sort(source2)));
		System.out.println(LocalDateTime.now());
		
		
		// RadixSort
		source = new int[] { 1, 6, 3, 8, 33, 27, 66, 9, 7, 88 };
		source2 = new int[] { 3, 44, 38, 5, 47, 15, 36, 26, 27, 2, 46, 4, 19, 50, 48 };
		System.out.println("---------RadixSort---------");
		System.out.println(LocalDateTime.now());
		System.out.println(Arrays.toString(RadixSort.sort(source2)));
		System.out.println(LocalDateTime.now());
	}

}
